package cn.stylefeng.guns.modular.business.frequency.cmdriver.entity;

import cn.stylefeng.guns.core.pojo.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 通讯录司机表
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
@Data
@TableName("cm_driver")
public class CmDriver {

    /**
     * id
     */
    @TableId("id")
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private Long createUser;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 更新人
     */
    @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    /**
     * company_id
     */
    @TableField("company_id")
    private Long companyId;

    /**
     * 司机姓名
     */
    @TableField("name")
    private String name;

    /**
     * 电话
     */
    @TableField("phone")
    private String phone;

    /**
     * 结算人身份证号
     */
    @TableField("card_number")
    private String cardNumber;

    /**
     * 车牌号
     */
    @TableField("license_plate_number")
    private String licensePlateNumber;

    /**
     * 司机类型 1.大板车 2.小板车
     */
    @TableField("type")
    private Integer type;

    /**
     * 1.已删除 0.未删除
     */
    @TableField("has_delete")
    private Integer hasDelete;

    /**
     * 创建人
     */
    @TableField(exist = false)
    private String nickName;

    @TableField(exist = false)
    private List<CmDriver> driverList;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id",fill = FieldFill.INSERT)
    private Long tenantId;

    public CmDriver() {

    }

    public CmDriver(Long id, Long companyId, String name, String phone, String cardNumber, String licensePlateNumber, Integer type, Long createUser, Integer hasDelete,Long tenantId) {
        this.id = id;
        this.companyId = companyId;
        this.name = name;
        this.phone = phone;
        this.cardNumber = cardNumber;
        this.licensePlateNumber = licensePlateNumber;
        this.type = type;
        this.createUser = createUser;
        this.hasDelete = hasDelete;
        this.tenantId=tenantId;
    }
}
